#include<stdio.h>
int  main()
{
	int n,m,totle;
	scanf("%d%d%d",&n,&m,&totle);
	int num[13][13]={0};
	while(totle--)
	{
		int x,y;
		scanf("%d%d",&x,&y);
		num[x-1][y-1]=1;
		num[x-1][y]=1;
		num[x-1][y+1]=1;
		num[x][y-1]=1;
		num[x][y]=1;
		num[x][y+1]=1;
		num[x+1][y-1]=1;
		num[x+1][y]=1;
		num[x+1][y+1]=1;
	}
	int result=0;
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++)
			if(num[i][j])
				result++;
	printf("%d",result);
}
